package com.example.iot.common;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

import com.example.iot.R;

public class BaseActivity extends AppCompatActivity implements TopBarListener {

    private View topBar;
    private View rootView;
    public TopBarBussiness topBarBussiness;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_base);
    }

    @Override
    protected void onPostCreate(@Nullable Bundle savedInstanceState) {
        super.onPostCreate(savedInstanceState);
        topBar = findViewById(R.id.fl_top_bar);
        rootView = findViewById(R.id.fl_content);
        topBarBussiness = new TopBarBussiness(topBar);
        initView(rootView);
        initData();
    }

    public void initView(View view) {

    }

    public void initData() {

    }

    @Override
    public void backImage(@Nullable int resId) {

    }

    @Override
    public void titleText(String title) {

    }

    @Override
    public void iconOne(boolean isIcon, int resId) {

    }

    @Override
    public void iconTwo(boolean isIcon, int resId) {

    }

    @Override
    public void rightText(String text) {

    }
}
